package com.ice_hufs.medical_in_myhand;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;


public class hotel extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
                , WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.activity_hotel);

        WebView webview = (WebView) findViewById(R.id.webview);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setSupportZoom(true);
        webview.loadUrl("http://kr.hotels.com/search/searchmap.html?pageName=ChangeSearchPage&mapZoomLevel=&viewType=MAP&priceFilterMultiplier=1&destinationName=분당차병원");
        //병원이름을 변수로 두고, string으로 병원이름 받아오기
        webview.setWebViewClient(new mainWebViewClient());

    }

    private class mainWebViewClient extends WebViewClient {

        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            view.loadUrl(url);
            return true;
        }
    }
}

